package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysBidroomTypeMapper;
import com.ruoyi.system.domain.SysBidroomType;
import com.ruoyi.system.service.ISysBidroomTypeService;

/**
 * 标室类型Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-30
 */
@Service
public class SysBidroomTypeServiceImpl implements ISysBidroomTypeService 
{
    @Autowired
    private SysBidroomTypeMapper sysBidroomTypeMapper;

    /**
     * 查询标室类型
     * 
     * @param id 标室类型主键
     * @return 标室类型
     */
    @Override
    public SysBidroomType selectSysBidroomTypeById(Long id)
    {
        return sysBidroomTypeMapper.selectSysBidroomTypeById(id);
    }

    /**
     * 查询标室类型列表
     * 
     * @param sysBidroomType 标室类型
     * @return 标室类型
     */
    @Override
    public List<SysBidroomType> selectSysBidroomTypeList(SysBidroomType sysBidroomType)
    {
        return sysBidroomTypeMapper.selectSysBidroomTypeList(sysBidroomType);
    }

    /**
     * 新增标室类型
     * 
     * @param sysBidroomType 标室类型
     * @return 结果
     */
    @Override
    public int insertSysBidroomType(SysBidroomType sysBidroomType)
    {
        sysBidroomType.setCreateTime(DateUtils.getNowDate());
        return sysBidroomTypeMapper.insertSysBidroomType(sysBidroomType);
    }

    /**
     * 修改标室类型
     * 
     * @param sysBidroomType 标室类型
     * @return 结果
     */
    @Override
    public int updateSysBidroomType(SysBidroomType sysBidroomType)
    {
        sysBidroomType.setUpdateTime(DateUtils.getNowDate());
        return sysBidroomTypeMapper.updateSysBidroomType(sysBidroomType);
    }

    /**
     * 批量删除标室类型
     * 
     * @param ids 需要删除的标室类型主键
     * @return 结果
     */
    @Override
    public int deleteSysBidroomTypeByIds(Long[] ids)
    {
        return sysBidroomTypeMapper.deleteSysBidroomTypeByIds(ids);
    }

    /**
     * 删除标室类型信息
     * 
     * @param id 标室类型主键
     * @return 结果
     */
    @Override
    public int deleteSysBidroomTypeById(Long id)
    {
        return sysBidroomTypeMapper.deleteSysBidroomTypeById(id);
    }
}
